<template>
  <UserSelector ref="usr" v-model="userId"/>
</template>
<script>
import Vue from 'vue'
import UserSelector from '@/components/Selector/UserSelector'
export default {
  components: {
    UserSelector
  },
  data() {
    return { userId: null, cancelBeforeStart: true }
  },
  methods: {
    getValue() {
      return this.userId
    },
    isCancelBeforeStart() {
      return this.cancelBeforeStart
    }
  },
  created() {
    this.userId = this.params.value
    this.cancelBeforeStart = false
  },
  mounted() {
    Vue.nextTick(() => {
      this.$refs.usr.focus()
    })
  }
}
</script>
